import { axios } from '@/utils/request'

export function fetchList (params) {
  return axios({
    url: '/sys/user/list',
    method: 'get',
    params: params
  })
}

export function getObj (id) {
  return axios({
    url: '/sys/user/info/' + id,
    method: 'get'
  })
}

export function addObj (obj) {
  return axios({
    url: '/sys/user/save',
    method: 'POST',
    data: obj
  })
}

export function putObj (obj) {
  return axios({
    url: '/sys/user/update',
    method: 'POST',
    data: obj
  })
}

export function delObj (id) {
  return axios({
    url: '/sys/user/delete/' + id,
    method: 'GET'
  })
}
